package com.czk;

import com.czk.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/4/29 10:49
 */
@SpringBootApplication
public class WebApplication implements CommandLineRunner {
    @Autowired
    private RedisUtil redisUtil;

    public static void main(String[] args) {
        SpringApplication.run(WebApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        // 重启是清除redis信息
        redisUtil.clear();
    }
}
